import 'package:flutter/material.dart';

import '../../../../core/utils/image_constant.dart';
import '../../../../theme/theme_helper.dart';
import '../../../gyms/gyms_page/bloc/gyms_screen.dart';


class OtherOptionItem extends StatelessWidget {
  final String title;
  final String imgPath;
  final Function? onTapped;
  const OtherOptionItem({super.key, required this.title, required this.imgPath, this.onTapped});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: (){
        onTapped?.call();
      },
      child: Card(
        color: Theme.of(context).colorScheme.secondary,
        child: Align(
          alignment: Alignment.center,
          child: Column(
            children: [
              Expanded(
                child: Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Image.asset(imgPath),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(4.0),
                child: Text(
                    title,
                    textAlign: TextAlign.center,
                    style: theme.textTheme.titleMedium,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
